﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1Command;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using C1.Win.C1Input;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_NhapKhoNoiBo : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("AdvBoPhan")]
        private ADVList _AdvBoPhan;
        [AccessedThroughProperty("AdvHopDong")]
        private ADVList _AdvHopDong;
        [AccessedThroughProperty("AdvSanPham")]
        private ADVList _AdvSanPham;
        [AccessedThroughProperty("AdvTaiKhoanCo")]
        private ADVAccount _AdvTaiKhoanCo;
        [AccessedThroughProperty("C1DockingTab1")]
        private C1DockingTab _C1DockingTab1;
        [AccessedThroughProperty("C1DockingTab2")]
        private C1DockingTab _C1DockingTab2;
        [AccessedThroughProperty("C1DockingTabPage1")]
        private C1DockingTabPage _C1DockingTabPage1;
        [AccessedThroughProperty("C1DockingTabPage2")]
        private C1DockingTabPage _C1DockingTabPage2;
        [AccessedThroughProperty("CboLoaiDuLieu")]
        private ComboBox _CboLoaiDuLieu;
        [AccessedThroughProperty("CboLoaiNhapXuat")]
        private ComboBox _CboLoaiNhapXuat;
        [AccessedThroughProperty("CboLoaiTien")]
        private ComboBox _CboLoaiTien;
        [AccessedThroughProperty("CmdAdd")]
        private ToolStripButton _CmdAdd;
        [AccessedThroughProperty("CmdAddRow")]
        private Button _CmdAddRow;
        [AccessedThroughProperty("CmdBoGhiSo")]
        private ToolStripButton _CmdBoGhiSo;
        [AccessedThroughProperty("CmdChuyen")]
        private Button _CmdChuyen;
        [AccessedThroughProperty("CmdCopy")]
        private Button _CmdCopy;
        [AccessedThroughProperty("CmdDel")]
        private ToolStripButton _CmdDel;
        [AccessedThroughProperty("CmdDelRow")]
        private Button _CmdDelRow;
        [AccessedThroughProperty("CmdEdit")]
        private ToolStripButton _CmdEdit;
        [AccessedThroughProperty("CmdExit")]
        private ToolStripButton _CmdExit;
        [AccessedThroughProperty("CmdFind")]
        private ToolStripButton _CmdFind;
        [AccessedThroughProperty("CmdGhiSo")]
        private ToolStripButton _CmdGhiSo;
        [AccessedThroughProperty("CmdPrint")]
        private ToolStripButton _CmdPrint;
        [AccessedThroughProperty("CmdSave")]
        private ToolStripButton _CmdSave;
        [AccessedThroughProperty("CmdUnsave")]
        private ToolStripButton _CmdUnsave;
        [AccessedThroughProperty("ImageList2")]
        private ImageList _ImageList2;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label10")]
        private Label _Label10;
        [AccessedThroughProperty("Label11")]
        private Label _Label11;
        [AccessedThroughProperty("Label12")]
        private Label _Label12;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label14")]
        private Label _Label14;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Label5")]
        private Label _Label5;
        [AccessedThroughProperty("Label7")]
        private Label _Label7;
        [AccessedThroughProperty("Label8")]
        private Label _Label8;
        [AccessedThroughProperty("Label9")]
        private Label _Label9;
        [AccessedThroughProperty("Panel4")]
        private Panel _Panel4;
        [AccessedThroughProperty("Panel5")]
        private Panel _Panel5;
        [AccessedThroughProperty("PNDungChung")]
        private Panel _PNDungChung;
        [AccessedThroughProperty("ToolStrip1")]
        private ToolStrip _ToolStrip1;
        [AccessedThroughProperty("ToolStripButton1")]
        private ToolStripSeparator _ToolStripButton1;
        [AccessedThroughProperty("ToolStripButton2")]
        private ToolStripButton _ToolStripButton2;
        [AccessedThroughProperty("ToolStripSeparator1")]
        private ToolStripSeparator _ToolStripSeparator1;
        [AccessedThroughProperty("ToolStripSeparator2")]
        private ToolStripSeparator _ToolStripSeparator2;
        [AccessedThroughProperty("ToolStripSeparator3")]
        private ToolStripSeparator _ToolStripSeparator3;
        [AccessedThroughProperty("TxtDienGiai")]
        private TextBox _TxtDienGiai;
        [AccessedThroughProperty("TxtNgayChungTu")]
        private DateTimePicker _TxtNgayChungTu;
        [AccessedThroughProperty("TxtNguoiGiao")]
        private TextBox _TxtNguoiGiao;
        [AccessedThroughProperty("TxtSoChungTu")]
        private TextBox _TxtSoChungTu;
        [AccessedThroughProperty("TxtSoLuong")]
        private C1NumericEdit _TxtSoLuong;
        [AccessedThroughProperty("TxtTienHang")]
        private C1NumericEdit _TxtTienHang;
        [AccessedThroughProperty("TxtTienHangNT")]
        private C1NumericEdit _TxtTienHangNT;
        [AccessedThroughProperty("txtTyGia")]
        private C1NumericEdit _txtTyGia;
        [AccessedThroughProperty("VSlist")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSlist;
        private string cFrmFormat;
        public string cFrmKhoa;
        private string cFrmKhoaOld;
        private string cFrmTask;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private bool mEnabledControl;
        private string mLoaiChungTu;
        private clsNhapKho objNK;
        private clsNhapKhoChiTiet objNKCT;
        private clsSoChungTu objSoCT;

        public Frm_NhapKhoNoiBo()
        {
            base.KeyDown += new KeyEventHandler(this.Frm_NhapKho_KeyDown);
            base.Load += new EventHandler(this.Frm_NhapKho_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.mLoaiChungTu = "NKNB";
            this.objSoCT = new clsSoChungTu();
            this.cFrmKhoa = "";
            this.cFrmTask = "";
            this.cFrmKhoaOld = "";
            this.objNK = new clsNhapKho();
            this.objNKCT = new clsNhapKhoChiTiet();
            this.InitializeComponent();
        }

        private void CboLoaiTien_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                this.txtTyGia.Value = 0;
            }
            else
            {
                string strCode = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                if (strCode != "")
                {
                    clsDMLoaiTien tien = new clsDMLoaiTien();
                    tien.LoadByCode(strCode);
                    if (tien.SoLe > 0)
                    {
                        this.cFrmFormat = modGeneral.H_FORMATNUMBER + "." + LVYModule.sRight("##########", tien.SoLe);
                    }
                    if (tien.TienViet == 1)
                    {
                        this.txtTyGia.Enabled = false;
                    }
                    this.txtTyGia.Value = tien.TyGia;
                    this.FormatNumber();
                }
            }
        }

        public bool CheckGrid()
        {
            if (this.VSlist.Rows.Count == 1)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn chưa nhập h\x00e0ng h\x00f3a nhập kho!", ""));
                this.CmdAddRow.Focus();
                return false;
            }
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 3]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("Bạn chưa nhập h\x00e0ng h\x00f3a nhập kho!", ""));
                    this.VSlist.Focus();
                    this.VSlist.Select(i, 4);
                    return false;
                }
                if ((Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 13]), 0, modGeneral.TypeOfValue.Nothing)) + Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 15]), 0, modGeneral.TypeOfValue.Nothing))) == 0.0)
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("Bạn chưa nhập số lượng hoặc trị gi\x00e1 h\x00e0ng nhập kho!", ""));
                    this.VSlist.Focus();
                    this.VSlist.Select(i, 13);
                    return false;
                }
            }
            return true;
        }

        public bool CheckIvalid()
        {
            if (LVYModule.ReturnIfNull(this.TxtSoChungTu.Text, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Số chứng từ kh\x00f4ng được để trốnng! Bạn vui l\x00f2ng nhập số chứng từ.", ""));
                this.TxtSoChungTu.Focus();
            }
            if (this.objNK.IsDuplicateVoucherNo(this.TxtSoChungTu.Text, this.cFrmKhoa))
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Số chứng từ bị tr\x00f9ng! bạn vui l\x00f2ng nhập số chứng từ kh\x00e1c.", ""));
                this.TxtSoChungTu.Focus();
                return false;
            }
            if (!LVYModule.CheckDateLock(LVYModule.Date2Char(this.TxtNgayChungTu.Text)))
            {
                return false;
            }
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn vui l\x00f2ng nhập loại nguy\x00ean tệ hạch to\x00e1n!", ""));
                this.CboLoaiTien.Focus();
                return false;
            }
            if (Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 0, modGeneral.TypeOfValue.Nothing)) == 0.0)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn vui l\x00f2ng nhập tỷ gi\x00e1 nguy\x00ean tệ!", ""));
                this.txtTyGia.Focus();
                return false;
            }
            if (LVYModule.ReturnIfNull(this.AdvTaiKhoanCo.Value, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn vui l\x00f2ng nhập số t\x00e0i khoản nợ!", ""));
                this.AdvTaiKhoanCo.Focus();
                return false;
            }
            if (!this.CheckGrid())
            {
                return false;
            }
            return true;
        }

        private void CmdAdd_Click(object sender, EventArgs e)
        {
            if (this.cFrmKhoa.Trim() != "")
            {
                this.cFrmKhoaOld = this.cFrmKhoa;
            }
            this.EmptyData();
            this.cFrmKhoa = modGeneral.CreatKey("ST_NhapKho", 15, "NK");
            this.objSoCT.Load(this.mLoaiChungTu);
            this.TxtSoChungTu.Text = this.objSoCT.CreateVoucher(LVYModule.sLeft(LVYModule.Date2Char(this.TxtNgayChungTu.Text), 6), 1);
            this.CboLoaiTien.SelectedValue = modGeneral.H_CURRENCY;
            this.EnabledControl = true;
            this.TxtSoChungTu.Focus();
            this.cFrmTask = "I";
        }

        private void CmdAddRow_Click(object sender, EventArgs e)
        {
            if (this.VSlist.Rows.Count == 1)
            {
                this.VSlist.AddItem("");
                if (LVYModule.ReturnIfNull(modGeneral.H_STOCKID, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    clsDMKho kho = new clsDMKho();
                    kho.Load(modGeneral.H_STOCKID);
                    this.VSlist[this.VSlist.Rows.Count - 1, 1] = kho.Khoa;
                    if (modGeneral.H_LANGUAGE.Trim().ToUpper() == "VIET")
                    {
                        this.VSlist[this.VSlist.Rows.Count - 1, 2] = kho.TenViet;
                    }
                    else
                    {
                        this.VSlist[this.VSlist.Rows.Count - 1, 2] = kho.TenAnh;
                    }
                    this.VSlist.Focus();
                    this.VSlist.Select(1, 2);
                }
                else
                {
                    this.VSlist.Focus();
                    this.VSlist.Select(1, 4);
                }
            }
            else if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[this.VSlist.Rows.Count - 1, 3]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                this.VSlist.AddItem("");
                this.VSlist[this.VSlist.Rows.Count - 1, 1] = RuntimeHelpers.GetObjectValue(this.VSlist[this.VSlist.Rows.Count - 2, 1]);
                this.VSlist[this.VSlist.Rows.Count - 1, 2] = RuntimeHelpers.GetObjectValue(this.VSlist[this.VSlist.Rows.Count - 2, 2]);
                this.VSlist.Focus();
                this.VSlist.Select(this.VSlist.Rows.Count - 1, 4);
            }
        }

        private void CmdBoGhiSo_Click(object sender, EventArgs e)
        {
            if (this.objNK.UnRegistered(this.cFrmKhoa))
            {
                this.CmdGhiSo.Visible = true;
                this.CmdBoGhiSo.Visible = false;
                this.CmdEdit.Enabled = true;
                this.CmdDel.Enabled = true;
            }
        }

        private void CmdCopy_Click(object sender, EventArgs e)
        {
            if ((this.VSlist.Rows.Count != 1) && (this.VSlist.Row > 0))
            {
                this.VSlist.AddItem("");
                int num2 = this.VSlist.Cols.Count - 1;
                for (int i = 0; i <= num2; i++)
                {
                    this.VSlist[this.VSlist.Rows.Count - 1, i] = RuntimeHelpers.GetObjectValue(this.VSlist[this.VSlist.Row, i]);
                    this.VSlist[this.VSlist.Rows.Count - 1, 0] = "";
                    this.VSlist[this.VSlist.Rows.Count - 1, 7] = "";
                }
            }
        }

        private void CmdDel_Click(object sender, EventArgs e)
        {
            if (((LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "") && LVYModule.ConfirmDelete("")) && this.objNK.DeleteData(this.cFrmKhoa))
            {
                this.EmptyData();
            }
        }

        private void CmdDelRow_Click(object sender, EventArgs e)
        {
            if (this.VSlist.Rows.Count != 1)
            {
                this.VSlist.RemoveItem(this.VSlist.Row);
            }
        }

        private void CmdEdit_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                this.cFrmKhoaOld = this.cFrmKhoa;
                this.cFrmTask = "U";
                this.EnabledControl = true;
            }
        }

        private void CmdExit_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdFind_Click(object sender, EventArgs e)
        {
            if (MyProject.Forms.Frm_NhapKhoNoiBoList.Visible)
            {
                this.Close();
            }
            else
            {
                MyProject.Forms.Frm_NhapKhoNoiBoList.ShowDialog();
            }
        }

        private void CmdGhiSo_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                MyProject.Forms.Frm_DinhKhoanPhieuNhapKho.cFrmKhoa = this.cFrmKhoa;
                MyProject.Forms.Frm_DinhKhoanPhieuNhapKho.ShowDialog();
                if (MyProject.Forms.Frm_DinhKhoanPhieuNhapKho.GhiSo)
                {
                    this.CmdGhiSo.Visible = false;
                    this.CmdBoGhiSo.Visible = true;
                    this.CmdEdit.Enabled = false;
                    this.CmdDel.Enabled = false;
                }
                else
                {
                    this.CmdGhiSo.Visible = true;
                    this.CmdBoGhiSo.Visible = false;
                    this.CmdEdit.Enabled = true;
                    this.CmdDel.Enabled = true;
                }
            }
        }

        private void CmdPrint_Click(object sender, EventArgs e)
        {
            ReportModule.PrintNhapKhoNoiBo(this.cFrmKhoa);
        }

        private void CmdSave_Click(object sender, EventArgs e)
        {
            if (this.CheckIvalid())
            {
                if (!this.SaveDetails())
                {
                    this.objNK.ClearTemp(this.cFrmKhoa);
                }
                else if (Conversions.ToBoolean(Microsoft.VisualBasic.CompilerServices.Operators.NotObject(this.UpdateData())))
                {
                    this.objNK.ClearTemp(this.cFrmKhoa);
                }
                else
                {
                    this.objNK.ClearTemp(this.cFrmKhoa);
                    this.EnabledControl = false;
                    this.cFrmTask = "";
                }
            }
        }

        private void CmdUnsave_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(this.cFrmKhoaOld, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                this.cFrmKhoa = this.cFrmKhoaOld;
                this.ShowData(this.cFrmKhoa);
            }
            else
            {
                this.EmptyData();
            }
            if (this.cFrmTask == "I")
            {
                this.objSoCT.UndoVoucher(LVYModule.sLeft(LVYModule.Date2Char(this.TxtNgayChungTu.Text), 6));
            }
            this.cFrmTask = "";
            this.EnabledControl = false;
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        public void EmptyData()
        {
            this.TxtSoChungTu.Text = "";
            this.TxtNgayChungTu.Text = Strings.Format(DateAndTime.Today, "dd/MM/yyyy");
            this.CboLoaiTien.SelectedValue = "";
            this.txtTyGia.Value = 0;
            this.TxtDienGiai.Text = "";
            this.TxtNguoiGiao.Text = "";
            this.TxtNguoiGiao.Text = "";
            this.VSlist.Rows.Count = 1;
            this.TxtTienHangNT.Value = 0;
            this.TxtTienHang.Value = 0;
        }

        public void FormatNumber()
        {
            LVYModule.advFormatNumber(this.txtTyGia, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtTienHangNT, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtTienHang, modGeneral.H_FORMATNUMBER);
        }

        private void Frm_NhapKho_KeyDown(object sender, KeyEventArgs e)
        {
            Keys keyCode = e.KeyCode;
            if (keyCode == Keys.ControlKey)
            {
                if (this.CmdAddRow.Enabled)
                {
                    this.CmdAddRow_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
            else if (keyCode == Keys.Escape)
            {
                if (this.CmdExit.Enabled)
                {
                    this.CmdExit_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
            else if (keyCode == Keys.F2)
            {
                if (this.CmdEdit.Enabled)
                {
                    this.CmdEdit_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
            else if (keyCode == Keys.F3)
            {
                this.CmdFind_Click(RuntimeHelpers.GetObjectValue(sender), e);
            }
            else if (keyCode == Keys.F4)
            {
                if (this.CmdAddRow.Enabled)
                {
                    this.CmdAddRow_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
            else if (keyCode == Keys.F5)
            {
                if (this.CmdDelRow.Enabled)
                {
                    this.CmdDelRow_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
            else if (keyCode == Keys.F8)
            {
                if (this.CmdAdd.Enabled)
                {
                    this.CmdAdd_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
            else if (keyCode == Keys.F9)
            {
                if (this.CmdDel.Enabled)
                {
                    this.CmdDel_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
            else if (keyCode == Keys.F10)
            {
                if (this.CmdSave.Enabled)
                {
                    this.CmdSave_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
            else if (keyCode == Keys.F11)
            {
                if (this.CmdUnsave.Enabled)
                {
                    this.CmdUnsave_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
            else if ((keyCode == Keys.F12) && this.CmdPrint.Enabled)
            {
                this.CmdPrint_Click(RuntimeHelpers.GetObjectValue(sender), e);
            }
        }

        private void Frm_NhapKho_Load(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                this.Cursor = Cursors.Default;
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                this.EnabledControl = false;
                this.KeyPreview = true;
                C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                vSlist.Cols[6].Visible = modGeneral.H_THEODOISOLOHANG;
                vSlist.Cols[7].Visible = modGeneral.H_THEODOISERI;
                vSlist.Cols[9].Visible = modGeneral.H_THEODOIHANDUNG;
                vSlist.Cols[9].EditMask = "##/##/####";
                vSlist.Cols[13].Editor = this.TxtSoLuong;
                vSlist = null;
                this.cFrmFormat = modGeneral.H_FORMATNUMBER;
                BuildComboModule.BuildCombo(this.CboLoaiTien, modGeneral.ListDanhMuc.LoaiTien, false, "", "");
                BuildComboModule.BuildCombo(this.CboLoaiNhapXuat, modGeneral.ListDanhMuc.LoaiNhapXuat, false, " Loai = 'NK'", "");
                BuildComboModule.InitComboDatatype(this.CboLoaiDuLieu);
                this.PNDungChung.Visible = modGeneral.H_KETHOPDULIEUTHUE;
                if (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    this.ShowData(this.cFrmKhoa);
                }
                this.Cursor = Cursors.Default;
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_NhapKhoNoiBo));
            this.TxtTienHangNT = new C1NumericEdit();
            this.TxtTienHang = new C1NumericEdit();
            this.VSlist = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.ImageList2 = new ImageList(this.components);
            this.CmdDelRow = new Button();
            this.CmdAddRow = new Button();
            this.Panel5 = new Panel();
            this.Label5 = new Label();
            this.ToolStripSeparator3 = new ToolStripSeparator();
            this.CmdExit = new ToolStripButton();
            this.ToolStripButton1 = new ToolStripSeparator();
            this.CmdDel = new ToolStripButton();
            this.CmdGhiSo = new ToolStripButton();
            this.CmdBoGhiSo = new ToolStripButton();
            this.ToolStripButton2 = new ToolStripButton();
            this.CmdEdit = new ToolStripButton();
            this.ToolStripSeparator2 = new ToolStripSeparator();
            this.CmdAdd = new ToolStripButton();
            this.CmdSave = new ToolStripButton();
            this.CmdFind = new ToolStripButton();
            this.CmdPrint = new ToolStripButton();
            this.CmdUnsave = new ToolStripButton();
            this.ToolStripSeparator1 = new ToolStripSeparator();
            this.AdvTaiKhoanCo = new ADVAccount();
            this.Label7 = new Label();
            this.CboLoaiNhapXuat = new ComboBox();
            this.AdvHopDong = new ADVList();
            this.AdvSanPham = new ADVList();
            this.AdvBoPhan = new ADVList();
            this.Label8 = new Label();
            this.Label12 = new Label();
            this.Label14 = new Label();
            this.TxtDienGiai = new TextBox();
            this.Label9 = new Label();
            this.TxtNguoiGiao = new TextBox();
            this.Label3 = new Label();
            this.CboLoaiTien = new ComboBox();
            this.txtTyGia = new C1NumericEdit();
            this.Label11 = new Label();
            this.Label10 = new Label();
            this.Label2 = new Label();
            this.Label13 = new Label();
            this.TxtNgayChungTu = new DateTimePicker();
            this.Label1 = new Label();
            this.TxtSoChungTu = new TextBox();
            this.ToolStrip1 = new ToolStrip();
            this.Panel4 = new Panel();
            this.TxtSoLuong = new C1NumericEdit();
            this.CmdCopy = new Button();
            this.PNDungChung = new Panel();
            this.CmdChuyen = new Button();
            this.CboLoaiDuLieu = new ComboBox();
            this.C1DockingTab1 = new C1DockingTab();
            this.C1DockingTabPage1 = new C1DockingTabPage();
            this.C1DockingTab2 = new C1DockingTab();
            this.C1DockingTabPage2 = new C1DockingTabPage();
            ((ISupportInitialize) this.TxtTienHangNT).BeginInit();
            ((ISupportInitialize) this.TxtTienHang).BeginInit();
            this.VSlist.BeginInit();
            this.Panel5.SuspendLayout();
            ((ISupportInitialize) this.txtTyGia).BeginInit();
            this.ToolStrip1.SuspendLayout();
            this.Panel4.SuspendLayout();
            ((ISupportInitialize) this.TxtSoLuong).BeginInit();
            this.PNDungChung.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab1).BeginInit();
            this.C1DockingTab1.SuspendLayout();
            this.C1DockingTabPage1.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab2).BeginInit();
            this.C1DockingTab2.SuspendLayout();
            this.C1DockingTabPage2.SuspendLayout();
            this.SuspendLayout();
            this.TxtTienHangNT.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTienHangNT.DataType = typeof(double);
            this.TxtTienHangNT.FormatType = FormatTypeEnum.Currency;
            Point point = new Point(0x59, 4);
            this.TxtTienHangNT.Location = point;
            this.TxtTienHangNT.Name = "TxtTienHangNT";
            Padding padding = new Padding(1);
            this.TxtTienHangNT.Padding = padding;
            this.TxtTienHangNT.ReadOnly = true;
            Size size = new Size(0x69, 20);
            this.TxtTienHangNT.Size = size;
            this.TxtTienHangNT.TabIndex = 0x85;
            this.TxtTienHangNT.Tag = null;
            this.TxtTienHangNT.TextAlign = HorizontalAlignment.Right;
            this.TxtTienHangNT.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTienHangNT.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienHangNT.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienHang.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTienHang.DataType = typeof(double);
            this.TxtTienHang.FormatType = FormatTypeEnum.Currency;
            point = new Point(0xc5, 4);
            this.TxtTienHang.Location = point;
            this.TxtTienHang.Name = "TxtTienHang";
            padding = new Padding(1);
            this.TxtTienHang.Padding = padding;
            this.TxtTienHang.ReadOnly = true;
            size = new Size(0x69, 20);
            this.TxtTienHang.Size = size;
            this.TxtTienHang.TabIndex = 130;
            this.TxtTienHang.Tag = null;
            this.TxtTienHang.TextAlign = HorizontalAlignment.Right;
            this.TxtTienHang.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTienHang.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienHang.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.VSlist.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.Light3D;
            this.VSlist.ColumnInfo = manager.GetString("VSlist.ColumnInfo");
            this.VSlist.Dock = DockStyle.Fill;
            this.VSlist.ExtendLastCol = true;
            this.VSlist.KeyActionEnter = KeyActionEnum.MoveAcross;
            point = new Point(0, 0);
            this.VSlist.Location = point;
            padding = new Padding(0);
            this.VSlist.Margin = padding;
            this.VSlist.Name = "VSlist";
            this.VSlist.Rows.Count = 1;
            this.VSlist.Rows.DefaultSize = 0x11;
            this.VSlist.Rows.MinSize = 20;
            size = new Size(0x37c, 0x13f);
            this.VSlist.Size = size;
            this.VSlist.StyleInfo = manager.GetString("VSlist.StyleInfo");
            this.VSlist.TabIndex = 0x10;
            this.VSlist.VisualStyle = C1.Win.C1FlexGrid.VisualStyle.Office2007Blue;
            this.ImageList2.ImageStream = (ImageListStreamer) manager.GetObject("ImageList2.ImageStream");
            this.ImageList2.TransparentColor = Color.Transparent;
            this.ImageList2.Images.SetKeyName(0, "orders_main.png");
            this.ImageList2.Images.SetKeyName(1, "checkingacct.png");
            this.ImageList2.Images.SetKeyName(2, "billing.png");
            this.CmdDelRow.Image = (Image) manager.GetObject("CmdDelRow.Image");
            this.CmdDelRow.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x62, 3);
            this.CmdDelRow.Location = point;
            this.CmdDelRow.Name = "CmdDelRow";
            size = new Size(0x55, 0x18);
            this.CmdDelRow.Size = size;
            this.CmdDelRow.TabIndex = 1;
            this.CmdDelRow.Text = "&2.X\x00f3a d\x00f2ng";
            this.CmdDelRow.TextImageRelation = TextImageRelation.ImageBeforeText;
            this.CmdDelRow.UseVisualStyleBackColor = true;
            this.CmdAddRow.Image = (Image) manager.GetObject("CmdAddRow.Image");
            this.CmdAddRow.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(3, 3);
            this.CmdAddRow.Location = point;
            this.CmdAddRow.Name = "CmdAddRow";
            size = new Size(0x5d, 0x18);
            this.CmdAddRow.Size = size;
            this.CmdAddRow.TabIndex = 0;
            this.CmdAddRow.Text = "&1.Th\x00eam d\x00f2ng";
            this.CmdAddRow.TextImageRelation = TextImageRelation.ImageBeforeText;
            this.CmdAddRow.UseVisualStyleBackColor = true;
            this.Panel5.BackgroundImage = (Image) manager.GetObject("Panel5.BackgroundImage");
            this.Panel5.Controls.Add(this.TxtTienHangNT);
            this.Panel5.Controls.Add(this.TxtTienHang);
            this.Panel5.Controls.Add(this.Label5);
            this.Panel5.Dock = DockStyle.Right;
            point = new Point(0x24b, 0);
            this.Panel5.Location = point;
            this.Panel5.Name = "Panel5";
            size = new Size(0x133, 0x20);
            this.Panel5.Size = size;
            this.Panel5.TabIndex = 0;
            this.Label5.AutoSize = true;
            this.Label5.BackColor = Color.Transparent;
            point = new Point(4, 8);
            this.Label5.Location = point;
            this.Label5.Name = "Label5";
            size = new Size(0x37, 13);
            this.Label5.Size = size;
            this.Label5.TabIndex = 0x73;
            this.Label5.Text = "Tiền h\x00e0ng";
            this.ToolStripSeparator3.Name = "ToolStripSeparator3";
            size = new Size(6, 0x19);
            this.ToolStripSeparator3.Size = size;
            this.CmdExit.Alignment = ToolStripItemAlignment.Right;
            this.CmdExit.Image = (Image) manager.GetObject("CmdExit.Image");
            this.CmdExit.ImageTransparentColor = Color.White;
            this.CmdExit.Name = "CmdExit";
            size = new Size(0x37, 0x16);
            this.CmdExit.Size = size;
            this.CmdExit.Text = "Th&o\x00e1t";
            this.ToolStripButton1.Name = "ToolStripButton1";
            size = new Size(6, 0x19);
            this.ToolStripButton1.Size = size;
            this.CmdDel.Image = (Image) manager.GetObject("CmdDel.Image");
            this.CmdDel.ImageTransparentColor = Color.White;
            this.CmdDel.Name = "CmdDel";
            size = new Size(0x2d, 0x16);
            this.CmdDel.Size = size;
            this.CmdDel.Text = "&X\x00f3a";
            this.CmdDel.ToolTipText = "F9 X\x00f3a chứng từ";
            this.CmdGhiSo.Image = (Image) manager.GetObject("CmdGhiSo.Image");
            this.CmdGhiSo.ImageTransparentColor = Color.White;
            this.CmdGhiSo.Name = "CmdGhiSo";
            size = new Size(0x38, 0x16);
            this.CmdGhiSo.Size = size;
            this.CmdGhiSo.Text = "&Ghi sổ";
            this.CmdGhiSo.Visible = false;
            this.CmdBoGhiSo.Image = (Image) manager.GetObject("CmdBoGhiSo.Image");
            this.CmdBoGhiSo.ImageTransparentColor = Color.Magenta;
            this.CmdBoGhiSo.Name = "CmdBoGhiSo";
            size = new Size(0x4d, 0x16);
            this.CmdBoGhiSo.Size = size;
            this.CmdBoGhiSo.Text = "&Huỷ ghi sổ";
            this.CmdBoGhiSo.Visible = false;
            this.ToolStripButton2.Alignment = ToolStripItemAlignment.Right;
            this.ToolStripButton2.Image = (Image) manager.GetObject("ToolStripButton2.Image");
            this.ToolStripButton2.ImageScaling = ToolStripItemImageScaling.None;
            this.ToolStripButton2.ImageTransparentColor = Color.White;
            this.ToolStripButton2.Name = "ToolStripButton2";
            size = new Size(0x31, 0x16);
            this.ToolStripButton2.Size = size;
            this.ToolStripButton2.Text = "&Help";
            this.CmdEdit.Image = (Image) manager.GetObject("CmdEdit.Image");
            this.CmdEdit.ImageTransparentColor = Color.White;
            this.CmdEdit.Name = "CmdEdit";
            size = new Size(0x2e, 0x16);
            this.CmdEdit.Size = size;
            this.CmdEdit.Text = "&Sửa";
            this.CmdEdit.ToolTipText = "F2 Sửa chứng từ";
            this.ToolStripSeparator2.Name = "ToolStripSeparator2";
            size = new Size(6, 0x19);
            this.ToolStripSeparator2.Size = size;
            this.CmdAdd.Image = (Image) manager.GetObject("CmdAdd.Image");
            this.CmdAdd.ImageTransparentColor = Color.White;
            this.CmdAdd.Name = "CmdAdd";
            size = new Size(0x48, 0x16);
            this.CmdAdd.Size = size;
            this.CmdAdd.Text = "&Th\x00eam mới";
            this.CmdAdd.ToolTipText = "F8 Th\x00eam mới";
            this.CmdSave.Image = (Image) manager.GetObject("CmdSave.Image");
            this.CmdSave.ImageTransparentColor = Color.WhiteSmoke;
            this.CmdSave.Name = "CmdSave";
            size = new Size(0x2d, 0x16);
            this.CmdSave.Size = size;
            this.CmdSave.Text = "&Lưu";
            this.CmdSave.ToolTipText = "F10 Lưu th\x00f4ng tin thay đổi";
            this.CmdFind.Image = (Image) manager.GetObject("CmdFind.Image");
            this.CmdFind.ImageTransparentColor = Color.White;
            this.CmdFind.Name = "CmdFind";
            size = new Size(0x43, 0x16);
            this.CmdFind.Size = size;
            this.CmdFind.Text = "T\x00ecm kiếm";
            this.CmdFind.ToolTipText = "F3 T\x00ecm kiếm chứng từ";
            this.CmdPrint.Image = (Image) manager.GetObject("CmdPrint.Image");
            this.CmdPrint.ImageTransparentColor = Color.White;
            this.CmdPrint.Name = "CmdPrint";
            size = new Size(0x25, 0x16);
            this.CmdPrint.Size = size;
            this.CmdPrint.Text = "&In";
            this.CmdPrint.ToolTipText = "F12 In chứng từ";
            this.CmdUnsave.Image = (Image) manager.GetObject("CmdUnsave.Image");
            this.CmdUnsave.ImageTransparentColor = Color.White;
            this.CmdUnsave.Name = "CmdUnsave";
            size = new Size(0x37, 0x16);
            this.CmdUnsave.Size = size;
            this.CmdUnsave.Text = "&K.Lưu";
            this.CmdUnsave.ToolTipText = "F11 Kh\x00f4ng lưu";
            this.ToolStripSeparator1.Name = "ToolStripSeparator1";
            size = new Size(6, 0x19);
            this.ToolStripSeparator1.Size = size;
            this.AdvTaiKhoanCo.Conditions = "";
            this.AdvTaiKhoanCo.DefaultValue = "";
            this.AdvTaiKhoanCo.FieldNameFilter = "";
            this.AdvTaiKhoanCo.KeyFilter = "";
            point = new Point(140, 0x37);
            this.AdvTaiKhoanCo.Location = point;
            padding = new Padding(0);
            this.AdvTaiKhoanCo.Margin = padding;
            this.AdvTaiKhoanCo.Name = "AdvTaiKhoanCo";
            this.AdvTaiKhoanCo.OnlyDigit = false;
            this.AdvTaiKhoanCo.ReadOnly = false;
            size = new Size(290, 20);
            this.AdvTaiKhoanCo.Size = size;
            this.AdvTaiKhoanCo.TabIndex = 3;
            this.AdvTaiKhoanCo.UpperText = true;
            this.AdvTaiKhoanCo.Value = "";
            this.AdvTaiKhoanCo.WithCode = 80;
            this.Label7.AutoSize = true;
            this.Label7.BackColor = Color.Transparent;
            point = new Point(0x31, 0x23);
            this.Label7.Location = point;
            this.Label7.Name = "Label7";
            size = new Size(0x36, 13);
            this.Label7.Size = size;
            this.Label7.TabIndex = 0x92;
            this.Label7.Text = "Loại nhập";
            this.CboLoaiNhapXuat.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiNhapXuat.FormattingEnabled = true;
            point = new Point(140, 0x1f);
            this.CboLoaiNhapXuat.Location = point;
            this.CboLoaiNhapXuat.Name = "CboLoaiNhapXuat";
            size = new Size(290, 0x15);
            this.CboLoaiNhapXuat.Size = size;
            this.CboLoaiNhapXuat.TabIndex = 2;
            this.AdvHopDong.LoaiDanhMuc = ADVList.ListDanhMuc.HopDong;
            point = new Point(0x216, 0x37);
            this.AdvHopDong.Location = point;
            this.AdvHopDong.Name = "AdvHopDong";
            this.AdvHopDong.ReadOnly = false;
            size = new Size(0x120, 20);
            this.AdvHopDong.Size = size;
            this.AdvHopDong.TabIndex = 8;
            this.AdvHopDong.UpperText = true;
            this.AdvHopDong.Value = "";
            this.AdvHopDong.WidthCode = 80;
            this.AdvSanPham.LoaiDanhMuc = ADVList.ListDanhMuc.SanPham;
            point = new Point(0x216, 0x20);
            this.AdvSanPham.Location = point;
            this.AdvSanPham.Name = "AdvSanPham";
            this.AdvSanPham.ReadOnly = false;
            size = new Size(0x120, 20);
            this.AdvSanPham.Size = size;
            this.AdvSanPham.TabIndex = 7;
            this.AdvSanPham.UpperText = true;
            this.AdvSanPham.Value = "";
            this.AdvSanPham.WidthCode = 80;
            this.AdvBoPhan.LoaiDanhMuc = ADVList.ListDanhMuc.BoPhan;
            point = new Point(0x216, 9);
            this.AdvBoPhan.Location = point;
            this.AdvBoPhan.Name = "AdvBoPhan";
            this.AdvBoPhan.ReadOnly = false;
            size = new Size(0x120, 20);
            this.AdvBoPhan.Size = size;
            this.AdvBoPhan.TabIndex = 6;
            this.AdvBoPhan.UpperText = true;
            this.AdvBoPhan.Value = "";
            this.AdvBoPhan.WidthCode = 80;
            this.Label8.AutoSize = true;
            this.Label8.BackColor = Color.Transparent;
            point = new Point(0x1c7, 0x3a);
            this.Label8.Location = point;
            this.Label8.Name = "Label8";
            size = new Size(0x37, 13);
            this.Label8.Size = size;
            this.Label8.TabIndex = 0x90;
            this.Label8.Text = "Hợp đồng";
            this.Label12.AutoSize = true;
            this.Label12.BackColor = Color.Transparent;
            point = new Point(0x1c7, 0x24);
            this.Label12.Location = point;
            this.Label12.Name = "Label12";
            size = new Size(0x37, 13);
            this.Label12.Size = size;
            this.Label12.TabIndex = 0x8f;
            this.Label12.Text = "Sản phẩm";
            this.Label14.AutoSize = true;
            this.Label14.BackColor = Color.Transparent;
            point = new Point(0x1c7, 12);
            this.Label14.Location = point;
            this.Label14.Name = "Label14";
            size = new Size(0x2f, 13);
            this.Label14.Size = size;
            this.Label14.TabIndex = 0x8e;
            this.Label14.Text = "Bộ phận";
            point = new Point(140, 0x66);
            this.TxtDienGiai.Location = point;
            this.TxtDienGiai.Name = "TxtDienGiai";
            size = new Size(0x2aa, 20);
            this.TxtDienGiai.Size = size;
            this.TxtDienGiai.TabIndex = 10;
            this.Label9.AutoEllipsis = true;
            this.Label9.AutoSize = true;
            this.Label9.BackColor = Color.Transparent;
            point = new Point(0x30, 0x69);
            this.Label9.Location = point;
            this.Label9.Name = "Label9";
            this.Label9.RightToLeft = RightToLeft.No;
            size = new Size(0x30, 13);
            this.Label9.Size = size;
            this.Label9.TabIndex = 0x5f;
            this.Label9.Text = "Diễn giải";
            this.Label9.TextAlign = ContentAlignment.TopRight;
            point = new Point(0x216, 0x4e);
            this.TxtNguoiGiao.Location = point;
            this.TxtNguoiGiao.Name = "TxtNguoiGiao";
            size = new Size(0x120, 20);
            this.TxtNguoiGiao.Size = size;
            this.TxtNguoiGiao.TabIndex = 9;
            this.Label3.AutoEllipsis = true;
            this.Label3.AutoSize = true;
            this.Label3.BackColor = Color.Transparent;
            point = new Point(0x1c8, 0x51);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            this.Label3.RightToLeft = RightToLeft.No;
            size = new Size(0x3a, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 0x5d;
            this.Label3.Text = "Người giao";
            this.Label3.TextAlign = ContentAlignment.TopRight;
            this.CboLoaiTien.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiTien.FormattingEnabled = true;
            point = new Point(140, 0x4e);
            this.CboLoaiTien.Location = point;
            this.CboLoaiTien.Name = "CboLoaiTien";
            size = new Size(0x6c, 0x15);
            this.CboLoaiTien.Size = size;
            this.CboLoaiTien.TabIndex = 4;
            this.txtTyGia.BorderStyle = BorderStyle.FixedSingle;
            this.txtTyGia.DataType = typeof(double);
            this.txtTyGia.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x14b, 0x4e);
            this.txtTyGia.Location = point;
            this.txtTyGia.Name = "txtTyGia";
            padding = new Padding(1);
            this.txtTyGia.Padding = padding;
            size = new Size(0x63, 20);
            this.txtTyGia.Size = size;
            this.txtTyGia.TabIndex = 5;
            this.txtTyGia.Tag = null;
            this.txtTyGia.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.txtTyGia.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.txtTyGia.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label11.AutoSize = true;
            this.Label11.BackColor = Color.Transparent;
            point = new Point(0x30, 0x51);
            this.Label11.Location = point;
            this.Label11.Name = "Label11";
            size = new Size(0x2f, 13);
            this.Label11.Size = size;
            this.Label11.TabIndex = 0x39;
            this.Label11.Text = "Loại tiền";
            this.Label11.TextAlign = ContentAlignment.TopRight;
            this.Label10.AutoSize = true;
            this.Label10.BackColor = Color.Transparent;
            point = new Point(0x112, 0x51);
            this.Label10.Location = point;
            this.Label10.Name = "Label10";
            size = new Size(0x24, 13);
            this.Label10.Size = size;
            this.Label10.TabIndex = 0x38;
            this.Label10.Text = "Tỷ gi\x00e1";
            this.Label10.TextAlign = ContentAlignment.TopRight;
            this.Label2.AutoSize = true;
            this.Label2.BackColor = Color.Transparent;
            point = new Point(0x30, 0x3b);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(70, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 0x25;
            this.Label2.Text = "T\x00e0i khoản c\x00f3";
            this.Label13.AutoSize = true;
            this.Label13.BackColor = Color.Transparent;
            point = new Point(0x116, 11);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x20, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 0x23;
            this.Label13.Text = "Ng\x00e0y";
            this.TxtNgayChungTu.Format = DateTimePickerFormat.Custom;
            point = new Point(0x14b, 8);
            this.TxtNgayChungTu.Location = point;
            this.TxtNgayChungTu.Name = "TxtNgayChungTu";
            size = new Size(0x63, 20);
            this.TxtNgayChungTu.Size = size;
            this.TxtNgayChungTu.TabIndex = 1;
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            point = new Point(0x30, 11);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x41, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0x21;
            this.Label1.Text = "Số chứng từ";
            point = new Point(140, 8);
            this.TxtSoChungTu.Location = point;
            this.TxtSoChungTu.Name = "TxtSoChungTu";
            size = new Size(0x6c, 20);
            this.TxtSoChungTu.Size = size;
            this.TxtSoChungTu.TabIndex = 0;
            this.ToolStrip1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgbluenoborder;
            this.ToolStrip1.Items.AddRange(new ToolStripItem[] { this.CmdAdd, this.CmdEdit, this.ToolStripSeparator2, this.CmdSave, this.CmdUnsave, this.ToolStripSeparator1, this.CmdFind, this.CmdPrint, this.ToolStripButton1, this.CmdDel, this.ToolStripSeparator3, this.CmdExit, this.ToolStripButton2, this.CmdGhiSo, this.CmdBoGhiSo });
            point = new Point(0, 0);
            this.ToolStrip1.Location = point;
            this.ToolStrip1.Name = "ToolStrip1";
            size = new Size(0x37e, 0x19);
            this.ToolStrip1.Size = size;
            this.ToolStrip1.TabIndex = 0x15;
            this.ToolStrip1.Text = "ToolStrip1";
            this.Panel4.BackgroundImage = (Image) manager.GetObject("Panel4.BackgroundImage");
            this.Panel4.Controls.Add(this.TxtSoLuong);
            this.Panel4.Controls.Add(this.CmdCopy);
            this.Panel4.Controls.Add(this.CmdDelRow);
            this.Panel4.Controls.Add(this.CmdAddRow);
            this.Panel4.Controls.Add(this.Panel5);
            this.Panel4.Dock = DockStyle.Bottom;
            point = new Point(0, 0x219);
            this.Panel4.Location = point;
            this.Panel4.Name = "Panel4";
            size = new Size(0x37e, 0x20);
            this.Panel4.Size = size;
            this.Panel4.TabIndex = 1;
            this.TxtSoLuong.BorderStyle = BorderStyle.FixedSingle;
            this.TxtSoLuong.DataType = typeof(double);
            this.TxtSoLuong.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x195, 0x3f);
            this.TxtSoLuong.Location = point;
            this.TxtSoLuong.Name = "TxtSoLuong";
            padding = new Padding(1);
            this.TxtSoLuong.Padding = padding;
            size = new Size(0x55, 20);
            this.TxtSoLuong.Size = size;
            this.TxtSoLuong.TabIndex = 0xa5;
            this.TxtSoLuong.Tag = null;
            this.TxtSoLuong.TextAlign = HorizontalAlignment.Right;
            this.TxtSoLuong.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.TxtSoLuong.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtSoLuong.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.CmdCopy.Image = (Image) manager.GetObject("CmdCopy.Image");
            this.CmdCopy.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0xba, 3);
            this.CmdCopy.Location = point;
            this.CmdCopy.Name = "CmdCopy";
            size = new Size(0x5b, 0x18);
            this.CmdCopy.Size = size;
            this.CmdCopy.TabIndex = 2;
            this.CmdCopy.Text = "&3.Copy d\x00f2ng";
            this.CmdCopy.TextImageRelation = TextImageRelation.ImageBeforeText;
            this.CmdCopy.UseVisualStyleBackColor = true;
            this.CmdCopy.Visible = false;
            this.PNDungChung.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            this.PNDungChung.Controls.Add(this.CmdChuyen);
            this.PNDungChung.Controls.Add(this.CboLoaiDuLieu);
            point = new Point(610, 0x19);
            this.PNDungChung.Location = point;
            this.PNDungChung.Name = "PNDungChung";
            size = new Size(0x117, 0x17);
            this.PNDungChung.Size = size;
            this.PNDungChung.TabIndex = 30;
            this.CmdChuyen.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            point = new Point(0xfd, 0);
            this.CmdChuyen.Location = point;
            this.CmdChuyen.Name = "CmdChuyen";
            size = new Size(0x18, 0x17);
            this.CmdChuyen.Size = size;
            this.CmdChuyen.TabIndex = 14;
            this.CmdChuyen.Text = ">";
            this.CmdChuyen.UseVisualStyleBackColor = true;
            this.CmdChuyen.Visible = false;
            this.CboLoaiDuLieu.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiDuLieu.FormattingEnabled = true;
            point = new Point(90, 1);
            this.CboLoaiDuLieu.Location = point;
            this.CboLoaiDuLieu.Name = "CboLoaiDuLieu";
            size = new Size(0xa3, 0x15);
            this.CboLoaiDuLieu.Size = size;
            this.CboLoaiDuLieu.TabIndex = 13;
            this.CboLoaiDuLieu.Visible = false;
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage1);
            this.C1DockingTab1.Dock = DockStyle.Fill;
            point = new Point(0, 0xc0);
            this.C1DockingTab1.Location = point;
            this.C1DockingTab1.Name = "C1DockingTab1";
            size = new Size(0x37e, 0x159);
            this.C1DockingTab1.Size = size;
            this.C1DockingTab1.TabIndex = 2;
            this.C1DockingTab1.TabsSpacing = 5;
            this.C1DockingTab1.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab1.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab1.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage1.Controls.Add(this.VSlist);
            this.C1DockingTabPage1.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage1.Location = point;
            this.C1DockingTabPage1.Name = "C1DockingTabPage1";
            size = new Size(0x37c, 0x13f);
            this.C1DockingTabPage1.Size = size;
            this.C1DockingTabPage1.TabIndex = 0;
            this.C1DockingTabPage1.Text = "Chi tiết h\x00e0ng h\x00f3a";
            this.C1DockingTab2.Controls.Add(this.C1DockingTabPage2);
            this.C1DockingTab2.Dock = DockStyle.Top;
            point = new Point(0, 0x19);
            this.C1DockingTab2.Location = point;
            this.C1DockingTab2.Name = "C1DockingTab2";
            size = new Size(0x37e, 0xa7);
            this.C1DockingTab2.Size = size;
            this.C1DockingTab2.TabIndex = 0;
            this.C1DockingTab2.TabsSpacing = 5;
            this.C1DockingTab2.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab2.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab2.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage2.Controls.Add(this.AdvTaiKhoanCo);
            this.C1DockingTabPage2.Controls.Add(this.Label3);
            this.C1DockingTabPage2.Controls.Add(this.Label7);
            this.C1DockingTabPage2.Controls.Add(this.TxtSoChungTu);
            this.C1DockingTabPage2.Controls.Add(this.CboLoaiNhapXuat);
            this.C1DockingTabPage2.Controls.Add(this.Label1);
            this.C1DockingTabPage2.Controls.Add(this.AdvHopDong);
            this.C1DockingTabPage2.Controls.Add(this.TxtNgayChungTu);
            this.C1DockingTabPage2.Controls.Add(this.AdvSanPham);
            this.C1DockingTabPage2.Controls.Add(this.Label13);
            this.C1DockingTabPage2.Controls.Add(this.AdvBoPhan);
            this.C1DockingTabPage2.Controls.Add(this.Label2);
            this.C1DockingTabPage2.Controls.Add(this.Label8);
            this.C1DockingTabPage2.Controls.Add(this.Label10);
            this.C1DockingTabPage2.Controls.Add(this.Label12);
            this.C1DockingTabPage2.Controls.Add(this.Label11);
            this.C1DockingTabPage2.Controls.Add(this.Label14);
            this.C1DockingTabPage2.Controls.Add(this.txtTyGia);
            this.C1DockingTabPage2.Controls.Add(this.TxtDienGiai);
            this.C1DockingTabPage2.Controls.Add(this.CboLoaiTien);
            this.C1DockingTabPage2.Controls.Add(this.Label9);
            this.C1DockingTabPage2.Controls.Add(this.TxtNguoiGiao);
            this.C1DockingTabPage2.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage2.Location = point;
            this.C1DockingTabPage2.Name = "C1DockingTabPage2";
            size = new Size(0x37c, 0x8d);
            this.C1DockingTabPage2.Size = size;
            this.C1DockingTabPage2.TabIndex = 0;
            this.C1DockingTabPage2.Text = "Th\x00f4ng tin phiếu nhập kho";
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x37e, 0x239);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.PNDungChung);
            this.Controls.Add(this.C1DockingTab1);
            this.Controls.Add(this.C1DockingTab2);
            this.Controls.Add(this.ToolStrip1);
            this.Controls.Add(this.Panel4);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.KeyPreview = true;
            this.Name = "Frm_NhapKhoNoiBo";
            this.ShowIcon = false;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "ST-0000";
            this.Text = "NHAP KHO NOI BO";
            ((ISupportInitialize) this.TxtTienHangNT).EndInit();
            ((ISupportInitialize) this.TxtTienHang).EndInit();
            this.VSlist.EndInit();
            this.Panel5.ResumeLayout(false);
            this.Panel5.PerformLayout();
            ((ISupportInitialize) this.txtTyGia).EndInit();
            this.ToolStrip1.ResumeLayout(false);
            this.ToolStrip1.PerformLayout();
            this.Panel4.ResumeLayout(false);
            ((ISupportInitialize) this.TxtSoLuong).EndInit();
            this.PNDungChung.ResumeLayout(false);
            ((ISupportInitialize) this.C1DockingTab1).EndInit();
            this.C1DockingTab1.ResumeLayout(false);
            this.C1DockingTabPage1.ResumeLayout(false);
            ((ISupportInitialize) this.C1DockingTab2).EndInit();
            this.C1DockingTab2.ResumeLayout(false);
            this.C1DockingTabPage2.ResumeLayout(false);
            this.C1DockingTabPage2.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        public bool SaveDetails()
        {
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    this.VSlist[i, 0] = modGeneral.CreatKey("ST_NhapKhoChiTiet", 15, "NK");
                }
                clsNhapKhoChiTiet objNKCT = this.objNKCT;
                objNKCT.Khoa = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                objNKCT.KhoaPhieuNhap = this.cFrmKhoa;
                objNKCT.KhoaKho = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 1]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                objNKCT.KhoaHangHoa = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 3]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                objNKCT.SoLoHang = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 6]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                objNKCT.SoSeri = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 7]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                objNKCT.NgayNhap = LVYModule.Date2Char(this.TxtNgayChungTu.Text);
                objNKCT.NgayHetHanDung = LVYModule.Date2Char(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 9]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim());
                objNKCT.KhoaDonViTinh = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 10]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                objNKCT.HeSo = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 12]), 1, modGeneral.TypeOfValue.Nothing));
                objNKCT.SoLuong = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 13]), 1, modGeneral.TypeOfValue.Nothing));
                objNKCT.LoaiTien = this.CboLoaiTien.SelectedValue.ToString().Trim();
                objNKCT.TyGia = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
                objNKCT.DonGiaNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 14]), 0, modGeneral.TypeOfValue.Nothing));
                objNKCT.DonGia = objNKCT.DonGiaNT * objNKCT.TyGia;
                objNKCT.TienHangNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 15]), 0, modGeneral.TypeOfValue.Nothing));
                objNKCT.TienHang = objNKCT.TienHangNT * objNKCT.TyGia;
                objNKCT.TyLeChietKhau = 0;
                objNKCT.TienChietKhauNT = 0.0;
                objNKCT.TienChietKhau = 0.0;
                objNKCT.TyLeThue = 0;
                objNKCT.TienThueNT = 0.0;
                objNKCT.TienThue = 0.0;
                objNKCT.KhoaTKHangHoa = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x10]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                if (!objNKCT.Save())
                {
                    return false;
                }
                objNKCT = null;
            }
            return true;
        }

        public void ShowData(string strKhoa)
        {
            if (this.objNK.Load(strKhoa))
            {
                clsNhapKho objNK = this.objNK;
                this.cFrmKhoa = objNK.Khoa;
                this.TxtSoChungTu.Text = objNK.SoChungTu;
                this.TxtNgayChungTu.Text = LVYModule.Char2Date(objNK.NgayChungTu);
                this.CboLoaiTien.SelectedValue = objNK.LoaiTien.ToString().Trim();
                this.txtTyGia.Value = objNK.TyGia;
                this.TxtNguoiGiao.Text = objNK.NguoiGiao;
                this.AdvTaiKhoanCo.Value = objNK.KhoaTKThanhToan;
                this.TxtTienHangNT.Value = objNK.TienHangNT;
                this.TxtTienHang.Value = objNK.TienHang;
                this.TxtDienGiai.Text = objNK.DienGiai;
                this.AdvBoPhan.Value = objNK.KhoaBoPhan;
                this.AdvSanPham.Value = objNK.KhoaSanPham;
                this.AdvHopDong.Value = objNK.KhoaHopDong;
                this.CboLoaiDuLieu.SelectedValue = objNK.DuLieu;
                objNK = null;
                DataTable listDetails = this.objNK.GetListDetails(this.cFrmKhoa);
                if (listDetails != null)
                {
                    int num2 = listDetails.Rows.Count - 1;
                    for (int i = 0; i <= num2; i++)
                    {
                        C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                        vSlist.AddItem("");
                        vSlist[vSlist.Rows.Count - 1, 0] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["Khoa"]);
                        vSlist[vSlist.Rows.Count - 1, 1] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["KhoaKho"]);
                        vSlist[vSlist.Rows.Count - 1, 2] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["KhoHang"]);
                        vSlist[vSlist.Rows.Count - 1, 3] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["KhoaHangHoa"]);
                        vSlist[vSlist.Rows.Count - 1, 4] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["Ma"]);
                        vSlist[vSlist.Rows.Count - 1, 5] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["HangHoa"]);
                        vSlist[vSlist.Rows.Count - 1, 6] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["SoLoHang"]);
                        vSlist[vSlist.Rows.Count - 1, 7] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["SoSeri"]);
                        vSlist[vSlist.Rows.Count - 1, 9] = LVYModule.Char2Date(Conversions.ToString(listDetails.Rows[i]["NgayHetHanDung"]));
                        vSlist[vSlist.Rows.Count - 1, 10] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["KhoaDonViTinh"]);
                        vSlist[vSlist.Rows.Count - 1, 11] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["DonViTinh"]);
                        vSlist[vSlist.Rows.Count - 1, 12] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["HeSo"]);
                        vSlist[vSlist.Rows.Count - 1, 13] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["SoLuong"]);
                        vSlist[vSlist.Rows.Count - 1, 14] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["DonGiaNT"]);
                        vSlist[vSlist.Rows.Count - 1, 15] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["TienHangNT"]);
                        vSlist[vSlist.Rows.Count - 1, 0x10] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["KhoaTKHangHoa"]);
                        vSlist[vSlist.Rows.Count - 1, 0x11] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["SoTaiKhoan"]);
                        vSlist = null;
                    }
                }
            }
        }

        public void TinhTienHang(int nRow)
        {
            double num2 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[nRow, 13]), 0, modGeneral.TypeOfValue.Nothing));
            double num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[nRow, 14]), 0, modGeneral.TypeOfValue.Nothing));
            this.VSlist[nRow, 15] = num2 * num;
        }

        public void TinhTong()
        {
            double num = 0.0;
            num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
            this.TxtTienHangNT.Value = LVYModule.SumColGrid(this.VSlist, 15);
            this.TxtTienHang.Value = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTienHangNT.Value), 0, modGeneral.TypeOfValue.Nothing)) * num;
        }

        private void TxtDienGiai_LostFocus(object sender, EventArgs e)
        {
            this.CmdAddRow.Focus();
        }

        public object UpdateData()
        {
            object obj2;
            clsNhapKho objNK = this.objNK;
            objNK.Khoa = this.cFrmKhoa;
            objNK.SoChungTu = LVYModule.ReturnIfNull(this.TxtSoChungTu.Text, "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
            objNK.NgayChungTu = LVYModule.Date2Char(this.TxtNgayChungTu.Text);
            objNK.LoaiTien = this.CboLoaiTien.SelectedValue.ToString().Trim();
            objNK.TyGia = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
            objNK.NguoiGiao = this.TxtNguoiGiao.Text;
            objNK.KhoaTKThanhToan = this.AdvTaiKhoanCo.Value;
            objNK.TienHangNT = Conversions.ToDouble(this.TxtTienHangNT.Value);
            objNK.TienHang = Conversions.ToDouble(this.TxtTienHang.Value);
            objNK.KhoaBoPhan = this.AdvBoPhan.Value;
            objNK.KhoaSanPham = this.AdvSanPham.Value;
            objNK.KhoaHopDong = this.AdvHopDong.Value;
            objNK.NguonNhap = "NB";
            if (objNK.KhoaNhanVienTao.Trim() == "")
            {
                objNK.KhoaNhanVienTao = modGeneral.H_USERID;
                objNK.NgayTao = LVYModule.Date2Char(Strings.Format(DateAndTime.Today, "dd/MM/yyyy"));
            }
            objNK.KhoaNhanVienSua = modGeneral.H_USERID;
            objNK.NgaySua = LVYModule.Date2Char(Strings.Format(DateAndTime.Today, "dd/MM/yyyy"));
            objNK.KhoaDonVi = modGeneral.H_CLIENT;
            objNK.DienGiai = this.TxtDienGiai.Text;
            objNK.GhiSo = 1;
            objNK.DuLieu = Conversions.ToString(this.CboLoaiDuLieu.SelectedValue);
            return objNK.Save();
            objNK = null;
            return obj2;
        }

        private void VSlist_AfterEdit(object sender, RowColEventArgs e)
        {
            switch (e.Col)
            {
                case 13:
                    this.TinhTienHang(e.Row);
                    break;

                case 14:
                    this.TinhTienHang(e.Row);
                    break;
            }
            this.TinhTong();
        }

        private void VSlist_BeforeEdit(object sender, RowColEventArgs e)
        {
            if (!this.mEnabledControl)
            {
                e.Cancel = true;
            }
            else if ((e.Col == 5) | (e.Col == 12))
            {
                e.Cancel = true;
            }
        }

        private void VSlist_CellButtonClick(object sender, RowColEventArgs e)
        {
            object obj2;
            string expression = "";
            switch (e.Col)
            {
                case 2:
                    expression = SearchModule.SearchStore("");
                    if (expression.Trim() != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 1] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 2] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 2 }, null));
                    }
                    this.VSlist.Select(e.Row, 4);
                    break;

                case 4:
                    expression = SearchModule.SearchHangHoa("", "", "");
                    if (expression.Trim() != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 3] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 4] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null));
                        this.VSlist[e.Row, 5] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 2 }, null));
                        this.VSlist[e.Row, 10] = "";
                        this.VSlist[e.Row, 11] = "";
                        this.VSlist[e.Row, 12] = 0;
                        DataTable hangHoa = new clsDMHangHoa().GetHangHoa(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null).ToString());
                        this.VSlist[e.Row, 10] = RuntimeHelpers.GetObjectValue(hangHoa.Rows[0]["KhoaDonViTinh"]);
                        this.VSlist[e.Row, 11] = RuntimeHelpers.GetObjectValue(hangHoa.Rows[0]["DonViTinh"]);
                        this.VSlist[e.Row, 12] = 1;
                        this.VSlist[e.Row, 0x10] = RuntimeHelpers.GetObjectValue(hangHoa.Rows[0]["KhoaTKHangHoa"]);
                        this.VSlist[e.Row, 0x11] = RuntimeHelpers.GetObjectValue(hangHoa.Rows[0]["TaiKhoanHangHoa"]);
                    }
                    this.VSlist.Select(e.Row, 7);
                    break;

                case 11:
                    obj2 = SearchModule.SearchDVT(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 3]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim(), this.VSlist, e.Row, e.Col, LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 10]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim());
                    if (obj2 != null)
                    {
                        if (Information.UBound((Array) obj2, 1) >= 2)
                        {
                            this.VSlist[e.Row, 10] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                            this.VSlist[e.Row, 11] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null));
                            this.VSlist[e.Row, 12] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 2 }, null));
                        }
                        break;
                    }
                    break;
            }
        }

        internal virtual ADVList AdvBoPhan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvBoPhan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvBoPhan = value;
            }
        }

        internal virtual ADVList AdvHopDong
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvHopDong;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvHopDong = value;
            }
        }

        internal virtual ADVList AdvSanPham
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvSanPham;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvSanPham = value;
            }
        }

        internal virtual ADVAccount AdvTaiKhoanCo
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTaiKhoanCo;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTaiKhoanCo = value;
            }
        }

        internal virtual C1DockingTab C1DockingTab1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab1 = value;
            }
        }

        internal virtual C1DockingTab C1DockingTab2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab2 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage1 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage2 = value;
            }
        }

        internal virtual ComboBox CboLoaiDuLieu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiDuLieu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboLoaiDuLieu = value;
            }
        }

        internal virtual ComboBox CboLoaiNhapXuat
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiNhapXuat;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboLoaiNhapXuat = value;
            }
        }

        internal virtual ComboBox CboLoaiTien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiTien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboLoaiTien_SelectedIndexChanged);
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged -= handler;
                }
                this._CboLoaiTien = value;
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdAdd
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAdd;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAdd_Click);
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click -= handler;
                }
                this._CmdAdd = value;
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click += handler;
                }
            }
        }

        internal virtual Button CmdAddRow
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAddRow;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAddRow_Click);
                if (this._CmdAddRow != null)
                {
                    this._CmdAddRow.Click -= handler;
                }
                this._CmdAddRow = value;
                if (this._CmdAddRow != null)
                {
                    this._CmdAddRow.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdBoGhiSo
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdBoGhiSo;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdBoGhiSo_Click);
                if (this._CmdBoGhiSo != null)
                {
                    this._CmdBoGhiSo.Click -= handler;
                }
                this._CmdBoGhiSo = value;
                if (this._CmdBoGhiSo != null)
                {
                    this._CmdBoGhiSo.Click += handler;
                }
            }
        }

        internal virtual Button CmdChuyen
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdChuyen;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdChuyen = value;
            }
        }

        internal virtual Button CmdCopy
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdCopy;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdCopy_Click);
                if (this._CmdCopy != null)
                {
                    this._CmdCopy.Click -= handler;
                }
                this._CmdCopy = value;
                if (this._CmdCopy != null)
                {
                    this._CmdCopy.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdDel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDel_Click);
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click -= handler;
                }
                this._CmdDel = value;
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click += handler;
                }
            }
        }

        internal virtual Button CmdDelRow
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDelRow;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDelRow_Click);
                if (this._CmdDelRow != null)
                {
                    this._CmdDelRow.Click -= handler;
                }
                this._CmdDelRow = value;
                if (this._CmdDelRow != null)
                {
                    this._CmdDelRow.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdEdit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdEdit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdEdit_Click);
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click -= handler;
                }
                this._CmdEdit = value;
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdExit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdExit_Click);
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click -= handler;
                }
                this._CmdExit = value;
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdFind
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdFind;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdFind_Click);
                if (this._CmdFind != null)
                {
                    this._CmdFind.Click -= handler;
                }
                this._CmdFind = value;
                if (this._CmdFind != null)
                {
                    this._CmdFind.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdGhiSo
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdGhiSo;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdGhiSo_Click);
                if (this._CmdGhiSo != null)
                {
                    this._CmdGhiSo.Click -= handler;
                }
                this._CmdGhiSo = value;
                if (this._CmdGhiSo != null)
                {
                    this._CmdGhiSo.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdPrint
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdPrint;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdPrint_Click);
                if (this._CmdPrint != null)
                {
                    this._CmdPrint.Click -= handler;
                }
                this._CmdPrint = value;
                if (this._CmdPrint != null)
                {
                    this._CmdPrint.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdSave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdSave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdSave_Click);
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click -= handler;
                }
                this._CmdSave = value;
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdUnsave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdUnsave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdUnsave_Click);
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click -= handler;
                }
                this._CmdUnsave = value;
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click += handler;
                }
            }
        }

        public bool EnabledControl
        {
            get
            {
                return this.mEnabledControl;
            }
            set
            {
                this.mEnabledControl = value;
                this.CmdAdd.Enabled = !value & this.mAllowAdd;
                this.CmdEdit.Enabled = !value & this.mAllowEdit;
                this.CmdSave.Enabled = value;
                this.CmdUnsave.Enabled = value;
                this.CmdDel.Enabled = !value & this.mAllowDel;
                this.CmdFind.Enabled = !value;
                this.CmdExit.Enabled = !value;
                this.CmdAddRow.Enabled = value;
                this.CmdDelRow.Enabled = value;
                this.CmdCopy.Enabled = value;
                this.CmdPrint.Enabled = !value;
                this.TxtSoChungTu.ReadOnly = !value;
                this.TxtNgayChungTu.Enabled = value;
                this.CboLoaiTien.Enabled = value;
                this.txtTyGia.ReadOnly = !value;
                this.TxtDienGiai.ReadOnly = !value;
                this.TxtNguoiGiao.ReadOnly = !value;
                this.AdvBoPhan.ReadOnly = !value;
                this.AdvSanPham.ReadOnly = !value;
                this.AdvHopDong.ReadOnly = !value;
                this.AdvTaiKhoanCo.ReadOnly = !value;
                this.CboLoaiNhapXuat.Enabled = value;
                this.CmdGhiSo.Enabled = !value & this.mAllowAdd;
                this.CmdBoGhiSo.Enabled = !value & this.mAllowAdd;
                this.CboLoaiDuLieu.Enabled = value;
                this.CmdChuyen.Enabled = !value;
            }
        }

        internal virtual ImageList ImageList2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ImageList2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ImageList2 = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label10
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label10;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label10 = value;
            }
        }

        internal virtual Label Label11
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label11;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label11 = value;
            }
        }

        internal virtual Label Label12
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label12;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label12 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label14
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label14;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label14 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Label Label5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label5 = value;
            }
        }

        internal virtual Label Label7
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label7;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label7 = value;
            }
        }

        internal virtual Label Label8
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label8;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label8 = value;
            }
        }

        internal virtual Label Label9
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label9;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label9 = value;
            }
        }

        internal virtual Panel Panel4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel4 = value;
            }
        }

        internal virtual Panel Panel5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel5 = value;
            }
        }

        internal virtual Panel PNDungChung
        {
            [DebuggerNonUserCode]
            get
            {
                return this._PNDungChung;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._PNDungChung = value;
            }
        }

        internal virtual ToolStrip ToolStrip1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStrip1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStrip1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripButton1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripButton1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripButton1 = value;
            }
        }

        internal virtual ToolStripButton ToolStripButton2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripButton2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripButton2 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator2 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator3 = value;
            }
        }

        internal virtual TextBox TxtDienGiai
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDienGiai;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtDienGiai_LostFocus);
                if (this._TxtDienGiai != null)
                {
                    this._TxtDienGiai.LostFocus -= handler;
                }
                this._TxtDienGiai = value;
                if (this._TxtDienGiai != null)
                {
                    this._TxtDienGiai.LostFocus += handler;
                }
            }
        }

        internal virtual DateTimePicker TxtNgayChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNgayChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNgayChungTu = value;
            }
        }

        internal virtual TextBox TxtNguoiGiao
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNguoiGiao;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNguoiGiao = value;
            }
        }

        internal virtual TextBox TxtSoChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoChungTu = value;
            }
        }

        internal virtual C1NumericEdit TxtSoLuong
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoLuong;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoLuong = value;
            }
        }

        internal virtual C1NumericEdit TxtTienHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTienHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTienHang = value;
            }
        }

        internal virtual C1NumericEdit TxtTienHangNT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTienHangNT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTienHangNT = value;
            }
        }

        internal virtual C1NumericEdit txtTyGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtTyGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtTyGia = value;
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSlist
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSlist;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                RowColEventHandler handler = new RowColEventHandler(this.VSlist_CellButtonClick);
                RowColEventHandler handler2 = new RowColEventHandler(this.VSlist_AfterEdit);
                RowColEventHandler handler3 = new RowColEventHandler(this.VSlist_BeforeEdit);
                if (this._VSlist != null)
                {
                    this._VSlist.CellButtonClick -= handler;
                    this._VSlist.AfterEdit -= handler2;
                    this._VSlist.BeforeEdit -= handler3;
                }
                this._VSlist = value;
                if (this._VSlist != null)
                {
                    this._VSlist.CellButtonClick += handler;
                    this._VSlist.AfterEdit += handler2;
                    this._VSlist.BeforeEdit += handler3;
                }
            }
        }
    }
}

